package controllers

import "myerp/models"

// 地区
type AreaController struct {
	MiController
}

//获取列表
func (c *AreaController) City() {
	pid, _ := c.GetInt("pid", 0)
	infos := make(map[string]interface{})
	infos["status"] = 0
	mode, err := models.GetAeraChind(pid)
	if err != nil {
		infos["msg"] = "没有了"
		c.Data["json"] = infos
	} else {
		infos["status"] = 1
		infos["list"] = mode
		c.Data["json"] = infos
	}
	c.ServeJSON()
}
